﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ECS.DAL.Entity
{
    /// <summary>
    /// MAWB data class
    /// </summary>
    public class MAWB : ObjectContext
    {
        #region private properties
        private string _mawbId = string.Empty;
        private string _mawb = string.Empty;
        private string _mawbPrefix = string.Empty;
        private string _mawbSerial = string.Empty;
        private string _hawb = string.Empty;
        private int _partialSequence = 0;
        private string _shipmentType = string.Empty;
        private string _slipType = string.Empty;
        private string _partialAccept = string.Empty;
        private string _carrier = string.Empty;
        private string _flightNo = string.Empty;
        private DateTime _flightDate;
        private string _destination = string.Empty;
        private string _agentCode = string.Empty;
        private string _agentName = string.Empty;
        private string _nog = string.Empty;
        private int _pieceCount = 0;
        private string _ewb = string.Empty;
        private string _fblNo = string.Empty;
        private string _activePick = string.Empty;
        #endregion

        #region public properties
        
        #endregion
        /// <summary>
        /// MAWB Id
        /// </summary>
        public string MawbId
        {
            set
            {
                _mawbId = value;
                UpdateObject();
            }
            get { return _mawbId; }
        }
        /// <summary>
        /// MAWB
        /// </summary>
        public string Mawb
        {
            set
            {
                _mawb = value;
                UpdateObject();
            }
            get { return _mawb; }
        }
        /// <summary>
        /// MAWB Prefix
        /// </summary>
        public string MawbPrefix
        {
            set
            {
                _mawbPrefix = value;
                UpdateObject();
            }
            get { return _mawbPrefix; }
        }
        /// <summary>
        /// MAWB Serial
        /// </summary>
        public string MawbSerial
        {
            set
            {
                _mawbSerial = value;
                UpdateObject();
            }
            get { return _mawbSerial; }
        }
        /// <summary>
        /// HAWB
        /// </summary>
        public string Hawb
        {
            set
            {
                _hawb = value;
                UpdateObject();
            }
            get { return _hawb; }
        }
        /// <summary>
        /// MAWB Partial Sequence
        /// </summary>
        public int PartialSequence
        {
            set
            {
                _partialSequence = value;
                UpdateObject();
            }
            get { return _partialSequence; }
        }
        /// <summary>
        /// shipment type
        /// </summary>
        public string ShipmentType
        {
            set
            {
                _shipmentType = value;
                UpdateObject();
            }
            get { return _shipmentType; }
        }
        /// <summary>
        /// slip type fix value to "LOCAL"
        /// </summary>
        public string SlipType
        {
            set
            {
                _slipType = value;
                UpdateObject();
            }
            get { return _slipType; }
        }
        /// <summary>
        /// Partial Acceptance Flag
        /// </summary>
        public string PartialAcceptFlag
        {
            set
            {
                _partialAccept = value;
                UpdateObject();
            }
            get { return _partialAccept; }
        }
        /// <summary>
        /// carrier
        /// </summary>
        public string Carrier
        {
            set
            {
                _carrier = value;
                UpdateObject();
            }
            get { return _carrier; }
        }
        /// <summary>
        /// flight number
        /// </summary>
        public string FlightNumber
        {
            set
            {
                _flightNo = value;
                UpdateObject();
            }
            get { return _flightNo; }
        }
        /// <summary>
        /// flight date
        /// </summary>
        public DateTime FlightDate
        {
            set
            {
                _flightDate = value;
                UpdateObject();
            }
            get { return _flightDate; }
        }
        /// <summary>
        /// Destination
        /// </summary>
        public string Destination
        {
            set
            {
                _destination = value;
                UpdateObject();
            }
            get { return _destination; }
        }
        /// <summary>
        /// Agent code
        /// </summary>
        public string AgentCode
        {
            set
            {
                _agentCode = value;
                UpdateObject();
            }
            get { return _agentCode; }
        }
        /// <summary>
        /// agent name
        /// </summary>
        public string AgentName
        {
            set
            {
                _agentName = value;
                UpdateObject();
            }
            get { return _agentName; }
        }
        /// <summary>
        /// nature of goods
        /// </summary>
        public string NoG
        {
            set
            {
                _nog = value;
                UpdateObject();
            }
            get { return _nog; }
        }
        /// <summary>
        /// total pieces count
        /// </summary>
        public int PieceCount
        {
            set
            {
                _pieceCount = value;
                UpdateObject();
            }
            get { return _pieceCount; }
        }
        /// <summary>
        /// EWS require flag
        /// </summary>
        public string EWS
        {
            set
            {
                _ewb = value;
                UpdateObject();
            }
            get { return _ewb; }
        }
        /// <summary>
        /// FBL flight number fix value to "1001"
        /// </summary>
        public string FBLFlightNumber
        {
            set
            {
                _fblNo = value;
                UpdateObject();
            }
            get { return _fblNo; }
        }
        public string ActivePick
        {
            set
            {
                _activePick = value;
                UpdateObject();
            }
            get { return _activePick; }
        }
        public int AWBSequence { set; get; }
        public int AWBMoveSequence { set; get; }
        /// <summary>
        /// application Id
        /// </summary>
        public string AppId { set; get; }
        /// <summary>
        /// Device
        /// </summary>
        public string Device { set; get; }
        /// <summary>
        /// User ID
        /// </summary>
        public string UserId { set; get; }

        public MAWB()
        {
            SlipType = "LOCAL";
        }
    }
}
